package org.kamionowski.supreme.services.global.impl;

import org.kamionowski.supreme.persistence.dao.ServiceDAO;
import org.kamionowski.supreme.persistence.entity.Service;
import org.kamionowski.supreme.services.global.ServicesService;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.transaction.annotation.Transactional;

import javax.inject.Inject;

/**
 * Created by IntelliJ IDEA.
 * User: Marcin Kamionowski
 * Date: 07.04.11
 * Time: 00:50
 */
@org.springframework.stereotype.Service
@Scope(value = BeanDefinition.SCOPE_SINGLETON)
public class ServicesServiceImpl implements ServicesService{

    @Inject
    private ServiceDAO serviceDAO;

    @Transactional(readOnly = true)
    @Override
    public Service selectById(Integer id) {
        return serviceDAO.selectById(id);
    }
}
